Ext.define('DragonApp.view.journal.Grid', {
    extend: 'Ext.grid.Panel',

    alias: ['widget.journalgrid'],

    requires: [
        'DragonApp.util.String',
        'DragonApp.store.JsonPJournal',
        'DragonApp.view.journal.FilterBar',
        'DragonApp.util.String'
    ],

    controller: 'journal',

    dockedItems: [{
        xtype: 'journal-filter',
        itemId: 'journal-filter',
        dock: 'top'
    }],
    columns: {
        defaults: {
            width: 120,
            align: 'center'
        },
        items: [
            { text: '日期时间', dataIndex: 'create_time', width: 145, renderer: DragonApp.util.String.stampToDatetimeRenderer },
            { text: '日志类型', dataIndex: 'type' },
            { text: '操作', dataIndex: 'cname', width: 145 },
            { text: '获得', dataIndex: 'get', width: 145, align: 'left', renderer: DragonApp.util.String.contentRender },
            { text: '消耗', dataIndex: 'use', width: 145, align: 'left', renderer: DragonApp.util.String.contentRender },
            { text: '备注', dataIndex: 'comments', align: 'left', flex: 1, renderer: DragonApp.util.String.contentRender }
        ]
    },
    store: {
        type: 'jsonPJournalStore',
        storeId: 'jsonPJournalStore'
    }
});